<!doctype html>
<html lang="en">

<head>
	<!-- Required meta tags -->
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!--favicon-->
	<link rel="icon" href="assets/images/favicon-32x32.png" type="image/png" />
	<!--plugins-->
	<link href="assets/plugins/simplebar/css/simplebar.css" rel="stylesheet" />
	<link href="assets/plugins/perfect-scrollbar/css/perfect-scrollbar.css" rel="stylesheet" />
	<link href="assets/plugins/metismenu/css/metisMenu.min.css" rel="stylesheet" />
	<!-- loader-->
	<link href="assets/css/pace.min.css" rel="stylesheet" />
	<script src="assets/js/pace.min.js"></script>
	<!-- Bootstrap CSS -->
	<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<!--	<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">-->
	<link href="assets/css/app.css" rel="stylesheet">
	<link href="assets/css/icons.css" rel="stylesheet">
	<title>鲲翔互联网学院考试管理系统</title>
</head>

<body class="bg-login">
	<!--wrapper-->
	<div class="wrapper">
		<div class="section-authentication-signin d-flex align-items-center justify-content-center my-5 my-lg-0">
			<div class="container-fluid">
				<div class="row row-cols-1 row-cols-lg-2 row-cols-xl-3">
					<div class="col mx-auto">
						<div class="mb-4 text-center">
							<h1></h1>
							<img src="assets/images/logo-img.png" width="180" alt="" />
						</div>
						<div class="card">
							<div class="card-body">
								<div class="border p-4 rounded">
									<div class="text-center">
										<h3 class="">登陆</h3>
										<p>没有账号?<a href="authentication-signup.html">点击注册</a>
										</p>
									</div>
									<div class="login-separater text-center mb-4"> <span>请输入登陆凭证</span>
										<hr/>
										<span id="sp" style="color:red;"></span>
										<br />
									</div>
									<div class="form-body">
										<form id="tableact" class="row g-3">
											<div class="col-12">
												<label for="inputEmailAddress" class="form-label">请输入学号</label>
												<input type="text" class="form-control"
													   name="user"
													   id="inputEmailAddress"
													   placeholder="Email Address">
											</div>
											<div class="col-12">
												<label for="inputChoosePassword" class="form-label">请输入密码
												</label>
												<div class="input-group" id="show_hide_password">
													<input type="password"
														   class="form-control border-end-0"
														   name="pwd"
														   id="inputChoosePassword"  placeholder="Enter Password"> <a href="javascript:;" class="input-group-text bg-transparent"><i class='bx bx-hide'></i></a>
												</div>
											</div>
											<div class="col-md-6">
												<div class="form-check form-switch">
													<input class="form-check-input" type="checkbox" id="flexSwitchCheckChecked" checked>
													<label class="form-check-label" for="flexSwitchCheckChecked">记住我</label>
												</div>
											</div>
											<div class="col-md-6 text-end">	<a href="authentication-forgot-password.html">找回密码 ?</a>
											</div>
											<div class="col-12">
												<div class="d-grid">
<!--													<button  class="btn btn-primary loginButton">-->
<!--														<i class="bx bxs-lock-open"></i>登陆</button>-->
													<input type="button" value="登陆"
														   class="btn btn-primary loginButton bx bxs-lock-open">
												</div>
											</div>
										</form>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<!--end row-->
			</div>
		</div>
	</div>
	<!--end wrapper-->
	<!-- Bootstrap JS -->
	<script src="assets/js/bootstrap.bundle.min.js"></script>
	<!--plugins-->
	<script src="assets/js/jquery.min.js"></script>
	<script src="assets/plugins/simplebar/js/simplebar.min.js"></script>
	<script src="assets/plugins/metismenu/js/metisMenu.min.js"></script>
	<script src="assets/plugins/perfect-scrollbar/js/perfect-scrollbar.js"></script>
	<!--Password show & hide js -->
	<script>
		$(function (){

			$(".loginButton").click(function (){
				var $tableact =  $('#tableact').serialize();
				$.get("/lo",$tableact,function (data){
					if (data == "查无此人") {
						$("#pwd").val("");
						$("#sp").text("账号或密码不对,请重新输入")
						return;
					}
					if(data == "Success"){
						$("#sp").text("")
						 window.location.href="/toMain";
					}
				})
			})



			$('.submitButton').click(function (){
				$.post("/addStudent",$tableact,function (data){
					if(data == "Success"){
						window.location.href="/toLogin";
					}else {
						return ;
					}
				})
			})

		})
		
		function login(){
			alert(999);
			window.open("02-main.html") ;
			window.close();
		}
		
	</script>
	<!--app JS-->
	<script src="assets/js/app.js"></script>
</body>

</html>